﻿using System;

namespace DataStore.Domain
{
    /// <summary>
    /// A country
    /// </summary>
    [Serializable]
    public class Country
    {
        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>The id.</value>
        public virtual Guid Id { get; set; }
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public virtual string Name { get; set; }
        public virtual string Code { get; set; }
        /// <summary>
        /// Gets or sets the language.
        /// </summary>
        /// <value>The language.</value>
        public virtual Language Language { get; set; }
        /// <summary>
        /// Gets or sets the flag.
        /// </summary>
        /// <value>The flag.</value>
        public virtual Link Flag { get; set; }

        public Country()
        {}

        public Country(Country country)
        {
            Update(country);
        }

        public virtual void Update(Country country)
        {
            Name = country.Name;
            Code = country.Code;
            Language = country.Language;
            Flag = country.Flag;
        }
    }
}
